<%-- internal/login/index.jsp --%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="problemDomain.EmployeeAccountBean, problemDomain.EmployeeAccountBean.Position,
 utilities.MySQLConnection, problemDomain.ErrorBean" %>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<%

EmployeeAccountBean employee = (EmployeeAccountBean)session.getAttribute("employee");
if(employee != null)
	session.invalidate();
%>


<html>
	<head>
		<!-- fix the content type -->
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link type="text/css" rel="stylesheet" href="../css/general.css" />
		<link type="text/css" rel="stylesheet" href="../css/framed.css" />
		<title>ORDRS - Login</title>
	</head>
	<body onload="document.getElementById('passcode').focus()">
		<div style="left: 6%;">
			<img src="../images/logo.bmp" />
		</div>
		<fieldset style="margin: 5%; margin-top: 25px; height: 60%; width: 80%; padding: 5%; border: 2px solid black">
			<legend style="font-size: 32px;">Login</legend>
			<div class="alignCenter alignCenter" style="top: 8%;">
				<h3>Swipe your card or enter your passcode</h3>
				<form action="/ordrs/internal/validate" method="post">
					<table class="alignCenter">
						<tr><td><input id="passcode" name="passcode" type="password" style="font-size: 2em" /></td></tr>
						<tr><td class="alignRight"><input value="Login" type="submit" style="font-size: 1.2em;" /></td></tr>
					</table>
				</form>
			</div>
			<div style="border: 1px solid black; padding: 1.5%; right: 3em; bottom: 3em; width: auto;">
				<h2>Manager Login</h2>
				<form action="/ordrs/internal/validate" method="post">
					<table>
						<tr>
							<td>Username:</td>
							<td><input name="username" value="captain" type="text" /></td>
						</tr>
						<tr>
							<td>Password:</td>
							<td><input name="password" value="password" type="password" /></td>
						</tr>
						<tr>
							<td colspan="0" class="alignRight"><input value="Login" type="submit" /></td>
						</tr>
					</table>
				</form>
			</div>
		</fieldset>
		<%
			String message = request.getParameter("message");
			if (message != null)
				out.println(message);
		%>
	</body>
</html>
